
// import { contextBridge, ipcRenderer } from "electron"

// contextBridge.exposeInMainWorld("electron", {
//     ipcRenderer,
// })
// contextBridge.exposeInMainWorld("electron", { ipcRenderer: { ...ipcRenderer, on: ipcRenderer.on } })
// window.ipcRenderer = ipcRenderer


const { contextBridge, ipcRenderer } = require("electron");

contextBridge.exposeInMainWorld("electron", {
    ipcRenderer: {
        ...ipcRenderer,
        on: ipcRenderer.on.bind(ipcRenderer),
        removeListener: ipcRenderer.removeListener.bind(ipcRenderer),
    },
});